package com.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dao.JurisdictionResourcesDAO;
import com.dao.RoleJurisdictionDAO;
import com.pojo.JurisdictionResources;
import com.pojo.RoleJurisdiction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@SuppressWarnings("all")
@Service
public class RoleJurisdictionService extends ServiceImpl<RoleJurisdictionDAO,RoleJurisdiction> {
    @Autowired
    private RoleJurisdictionDAO jurisdictionDAO;

    @Autowired
    private JurisdictionResourcesDAO jurisdictionResourcesDAO;

    public List<JurisdictionResources> getsources(){
        return jurisdictionResourcesDAO.getResources();
    }


    /**
     *  分页查询角色
     * @param page   第几条数据
     * @param limit  一页显示几条数据
     * @param m  查询参数
     * @return
     */

    public List<Map> selectRoleNameAndUsername(String userName){
        return jurisdictionDAO.selectRoleNameAndUsername(userName);
    }

    public List<JurisdictionResources> selectJurisdictionName(){
        return jurisdictionDAO.selectJurisdictionName();
    }

    public List<RoleJurisdiction> selectRole(){
        return jurisdictionDAO.selectRole();
    }

}
